package com.itheima.demo05;

public class RecursionDemo01 {
    public static void main(String[] args) {
        //递归
        //求1~100之间和



        System.out.println(getSum(100));

    }

    public static int getSum(int number){
        if (number == 1){
            return 1;
        }
        System.out.println(number);
        return number + getSum(number - 1);
    }
}
